<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            background:red;
            margin-bottom:10px;
        }
        .on{
            display: none;
         }
    </style>
    <script src="jquery-3.2.0.min.js"></script>
    <script>
       $(function(){
           $('#btn').click(function(){
               $('#box').toggleClass('on')
           })
       })
    </script>
</head>
<body>
<input type="button" value="哈哈哈哈哈" id="btn">
<div id="box"></div>
</body>
</html>